API Documentation
Public Member Functions | List of all members
nkGraphics::RenderQueueManager Class Referencefinal

Manages the render queues available in the component. More...

Inheritance diagram for nkGraphics::RenderQueueManager:

Public Member Functions

 ~RenderQueueManager ()
 
RenderQueuecreateOrRetrieve (int index=-1)
 
RenderQueuecreateOrRetrieve (const std::string_view &name)
 
RenderQueueget (unsigned int index) const
 
RenderQueueget (const std::string_view &name) const
 
RenderQueuegetByIndex (unsigned int indexGlobal) const
 
RenderQueuegetNamedByIndex (unsigned int indexGlobal) const
 
void rename (const std::string_view &oldName, const std::string_view &newName)
 
void erase (const std::string_view &name)
 
void updateRenderingQueue (int minRQ, int maxRQ)
 
void updateRenderingQueue (const std::string_view &name)
 
void updateRenderingQueue (RenderQueue *fromThisOne)
 
RenderQueuegetComputedRenderingQueue () const
 

Detailed Description

Manages the render queues available in the component.

The manager owns the memory it allocates. External code should not delete it.

Constructor & Destructor Documentation

◆ ~RenderQueueManager()

nkGraphics::RenderQueueManager::~RenderQueueManager ( )

Destructor.

Member Function Documentation

◆ createOrRetrieve() [1/2]

RenderQueue* nkGraphics::RenderQueueManager::createOrRetrieve ( int  index = -1)

Creates if unavailable, or retrieves if available, a render queue.

Parameters
indexThe numerical index of the queue to retrieve.
Returns
The queue requested, possibly freshly created. The manager owns the memory allocated, external code should not delete it. See erase().

◆ createOrRetrieve() [2/2]

RenderQueue* nkGraphics::RenderQueueManager::createOrRetrieve ( const std::string_view &  name)

Creates if unavailable, or retrieves if available, a render queue.

Parameters
nameThe name of the queue to retrieve.
Returns
The queue requested, possibly freshly created. The manager owns the memory allocated, external code should not delete it. See erase().

◆ get() [1/2]

RenderQueue* nkGraphics::RenderQueueManager::get ( unsigned int  index) const

Retrieves a queue.

Parameters
indexThe numerical index of the queue to retrieve.
Returns
The queue requested if available, nullptr else.

◆ get() [2/2]

RenderQueue* nkGraphics::RenderQueueManager::get ( const std::string_view &  name) const

Retrieves a queue.

Parameters
nameThe name of the queue to retrieve.
Returns
The queue requested if available, nullptr else.

◆ getByIndex()

RenderQueue* nkGraphics::RenderQueueManager::getByIndex ( unsigned int  indexGlobal) const

Retrieves a render queue given an index, fetching indexed queues and named queues. Note that as the internal memory is changed, an index can map to different resources over different calls. Mainly used to loop over all queues in one go.

Parameters
indexGlobalThe index of the queue to retrieve.
Returns
The queue requested if available, nullptr else.

◆ getNamedByIndex()

RenderQueue* nkGraphics::RenderQueueManager::getNamedByIndex ( unsigned int  indexGlobal) const

Retrieves a named queue, by index. Note that an index can point to different queues as the memory gets changed. Mainly used to loop over all named render queues in one go.

Parameters
indexGlobalThe index of the queue to retrieve.
Returns
The queue requested if available, nullptr else.

◆ rename()

void nkGraphics::RenderQueueManager::rename ( const std::string_view &  oldName,
const std::string_view &  newName 
)

Renames a queue, changing both its name and the way to access it within the manager.

Parameters
oldNameThe name of the queue to change.
newNameThe name to rename it to.

◆ erase()

void nkGraphics::RenderQueueManager::erase ( const std::string_view &  name)

Erases and frees the memory of a render queue.

Parameters
nameThe name of the render queue to erase.

◆ updateRenderingQueue() [1/3]

void nkGraphics::RenderQueueManager::updateRenderingQueue ( int  minRQ,
int  maxRQ 
)

Updates the rendering queue. Used internally in the rendering process.

Parameters
minRQThe minimum index of the queue that will serve as base.
maxRQThe maximum index of the queue that will serve as base.
Remarks
This function and way of working with RQ will soon change. External code should avoid using it.

◆ updateRenderingQueue() [2/3]

void nkGraphics::RenderQueueManager::updateRenderingQueue ( const std::string_view &  name)

Updates the rendering queue. Used internally in the rendering process.

Parameters
nameThe name of the queue to use.
Remarks
This function and way of working with RQ will soon change. External code should avoid using it.

◆ updateRenderingQueue() [3/3]

void nkGraphics::RenderQueueManager::updateRenderingQueue ( RenderQueue fromThisOne)

Updates the rendering queue. Used internally in the rendering process.

Parameters
fromThisOneThe queue to use as a basis to update.
Remarks
This function and way of working with RQ will soon change. External code should avoid using it.

◆ getComputedRenderingQueue()

RenderQueue* nkGraphics::RenderQueueManager::getComputedRenderingQueue ( ) const
Returns
The computed rendering queue after update.
Remarks
This function and way of working with RQ will soon change. External code should avoid using it.

The documentation for this class was generated from the following file: